$(function() {
	
	let num = 0;
	let b = document.querySelector(".banner .page b");
	let line = document.querySelector(".banner .page i");
	let span = document.querySelector(".banner .page span");
	
	var banner = new Swiper('.banner .swiper-container', {
		pagination: {
			el: '.swiper-pagination',
			clickable: true,
			renderBullet:function(index, className) {
			return '<span class="' + className + '">0' + (index + 1) + '</span>';
			}
		}
	});
	
	
	$('.menu').click(function(){
		$('.header').toggleClass('h-menu-show')
	})
	
	$('.wap-menu .ul li .dropdown').click(function(){
		$(this).toggleClass('on').parent().siblings().find('.dropdown').removeClass('on');
		$(this).siblings().slideToggle().parent().siblings().find('.sub-menu').hide();
	});
	
	
	
	let banner1 = new Swiper('.index-product .swiper-container', {
		slidesPerView: 1,
		loop:true,
		speed:500,
		type:'fraction',
		passiveListeners : false,
		autoplay: true,
		pagination:{
			el: '.index-product .swiper-container .swiper-pagination',
			clickable: true,
			renderBullet: function (index, className) {
			  return '<span class="' + className + '">' +'0'+(index + 1) + '</span>';
			},
		},
	});
	
	
	let ijiang = new Swiper('.ijiang .swiper-container', {
		slidesPerView : 1,
		navigation: {
			prevEl: '.prev',
			nextEl: '.next',
		},
		pagination: {
			el: '.ijiang .swiper-pagination',
		}
	});
	
		
	let data = new Swiper('.data .swiper-container', {
		spaceBetween:30,
		slideToClickedSlide:true,
		pagination: {
			el: '.data .swiper-pagination',
		}
	});
	let pol_list = new Swiper('.pol_list .swiper-container', {
		spaceBetween:30,
		slideToClickedSlide:true,
		pagination: {
			el: '.pol_list .swiper-pagination',
		}
	});
	let adv_list = new Swiper('.adv_list .swiper-container', {
		navigation: {
			nextEl: '.adv_list .swiper-button-next',
			prevEl: '.adv_list .swiper-button-prev',
		},
	});


	let prov = new Swiper('.prov .swiper-container', {
		direction: 'vertical',
		slidesPerView: 'auto',
		freeMode: true,
		scrollbar: {
			el: '.swiper-scrollbar',
		},
		mousewheel: true,
	});
	
	
	
	let trait = new Swiper('.trait .swiper-container', {
		slidesPerView:3,
		freeMode: true,
		slideToClickedSlide:true,
		pagination: {
			el: '.trait .swiper-pagination',
		}
	});
	
	
	$('.close').on('click',function(){$('.login').hide();$('.zhezhao').hide();});
	$('.down_box').click(function(){$('.login').show();$('.zhezhao').show();});
	
	$('.zhezhao').on("click",function(e){
		var target = $(e.target);
		if(target.closest(".login").length == 0){
			$('.login').hide();$('.zhezhao').hide();
		}
	})
	
	
		
	let job = $('.job .hd');
	job.each(function(){
		$(this).on('click', function(){
			$(this).parent().siblings().find('.bd').slideUp();
			$(this).parent().find('.bd').slideToggle();
			$(this).parent().siblings().find('.hd').removeClass('on');
			$(this).toggleClass("on");
		});
	});
	
	
	let area = new Swiper('.area .swiper-container', {
		spaceBetween:30,
		slideToClickedSlide:true,
		pagination: {
			el: '.area .swiper-pagination',
		}
	});
	
	
	
	
	
});